import {JSX} from "react";
import { Link } from "react-router-dom";
import { useWeb3Modal } from '@web3modal/wagmi/react';
import { useAccount } from 'wagmi';

export default function Swap():JSX.Element {
    const { open } = useWeb3Modal();
    const account = useAccount();
    console.log(account)
    return (
        <div className="xs:text-4xl text-yellow-400">
            <h1>I am Swap</h1>
            <Link to="/farm">Farm</Link>
            {account.address ? <h1>{account.address}</h1> :
                <button onClick={() => open()}>Open Connect Modal</button>
            }
        </div>
    )
}